<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:util="http://www.springframework.org/schema/util" 
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
       http://www.springframework.org/schema/context 
       http://www.springframework.org/schema/context/spring-context-4.0.xsd
       http://www.springframework.org/schema/util 
       http://www.springframework.org/schema/util/spring-util-4.0.xsd 
       http://www.springframework.org/schema/mvc 
       http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
        http://www.springframework.org/schema/aop
       http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
">
	<!-- 扫包 -->
	<mvc:annotation-driven></mvc:annotation-driven>
	<context:component-scan base-package="com.tao.controller"></context:component-scan>
	
	<!-- 过滤资源文件 -->
	<mvc:resources mapping="js/*" location="WEB-INF/resource/js/"/>
	<mvc:resources mapping="css/**" location="WEB-INF/resource/css/"/>
	<mvc:resources mapping="imgs/**" location="WEB-INF/resource/imgs/"/>
	<mvc:resources mapping="layui/**" location="WEB-INF/resource/layui/"/>
	<mvc:resources mapping="html/**" location="pages/"/>
	

	<!-- 文件上传 -->
	<bean id="multipartResolver"
	        class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
	    <property name="defaultEncoding">
	        <value>UTF-8</value>
	    </property>
	    <property name="maxUploadSize">
	        <value>32505856</value><!-- 上传文件大小限制为31M，31*1024*1024 -->
	    </property>
	    <property name="maxInMemorySize">
	        <value>4096</value>
	    </property>
	</bean>	
	
	<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
		<property name="prefix" value="/WEB-INF/pages/"></property>
		<property name="suffix" value=".jsp"></property>
	</bean>
</beans>